// 常量路由
export const constantRoutes = [
  // 登录
  {
    path: '/login',
    name: '登录',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      hidden: true,
    },
  },
  // 首页
  {
    path: '/',
    name: '首页',
    component: () => import('@/layout/index.vue'),
    redirect: '/home',
    meta: {hidden: false, icon: 'HomeFilled' },
    children: [
      {
        path: '/home',
        name: '首页',
        component: () => import('@/views/home/index.vue'),
        meta: { title: '首页',hidden: false, icon: 'HomeFilled'},
      },
    ],
  },
  // 数据大屏
  {
    path: '/screen',
    name: '数据大屏',
    component: () => import('@/views/screen/index.vue'),
    meta: {title: '数据大屏', hidden: false, icon: 'Platform'}
  },
  // acl 权限管理
  {
    path: '/acl',
    name: 'Acl',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '权限管理',
      hidden: false,
      icon: 'ChromeFilled',
    },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        name: '用户管理',
        component: () => import('@/views/acl/user/index.vue'),
        meta: { title: '用户管理',icon: 'User'},
      },
      {
        path: '/acl/permission',
        name: '菜单管理',
        component: () => import('@/views/acl/permission/index.vue'),
        meta: { title: '菜单管理',icon: 'Operation'},
      },
      {
        path: '/acl/role',
        name: '角色管理',
        component: () => import('@/views/acl/role/index.vue'),
        meta: { title: '角色管理',icon: 'Monitor'},
      },
    ],
  },
  // 自定义信息管理
  {
    path: '/info',
    name: 'info',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '信息管理',
      hidden: false,
      icon: 'InfoFilled',
    },
    redirect: '/info/infoOne',
    children: [
      {
        path: '/info/infoOne',
        name: '信息一',
        component: () => import('@/views/info/infoOne/index.vue'),
        meta: { title: '信息一',icon: 'ChatLineSquare'},
      },
      {
        path: '/info/infoTwo',
        name: '信息二',
        component: () => import('@/views/info/infoTwo/index.vue'),
        meta: { title: '信息二',icon: 'ChatDotSquare'},
      }
    ],
  },
  // 404 重定向
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'any',
    meta: { title: '任意路由', hidden: true },
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/404/index.vue'),
    meta: { title: '404 not found', hidden: true },
  },
];
